import Manage from '@/views/Manage.vue'


export default {
    path: '/manage',
    component: Manage,
    name: 'Manage',
    children: [
        // 默认路由
        {
            path: '/',
            redirect: '/manage/home',
          
        },
        {
            path: 'home',
            name:'Home',
            component:()=>import('@/views/manage/Home.vue'),
            meta:{
                title:'首页',
                auth:true,
                activeMenu:'Home',
            }
        },
        {
            path: 'user',
            name:'User',
            children: [{
                    path: 'list',
                    name:'UserList',
                    component:()=>import('@/views/manage/user/List.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'UserList'
                    }
                  
                },
                {
                    path: 'add',
                    name:'UserAdd',
                    component:()=>import('@/views/manage/user/Add.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'UserAdd'
                    }
                
                },
            ]
        },
        {
            path: 'goods',
            name:'Goods',
            children: [{
                    path: 'list',
                    name:'GoodsList',
                    component:()=>import('@/views/manage/goods/List.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'GoodsList'
                    }
                },
                {
                    path: 'add',
                    name:'GoodsAdd',
                    component:()=>import('@/views/manage/goods/Add.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'GoodsAdd'
                    }
                },
                {
                    path: ':id',
                    name:'GoodsEdit',
                    component:()=>import('@/views/manage/goods/Edit.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'GoodsEdit'
                    }
                },
            ]
        },
        {
            path: 'category',
            meta:{title:'分类管理'},
            name:'Category',
            children: [{
                    path: 'list',
                    name:'CategoryList',
                    component:()=>import('@/views/manage/category/List.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'CategoryList'
                    }
                },
                {
                    path: 'add',
                    name:'CategoryAdd',
                    component:()=>import('@/views/manage/category/Add.vue'),
                    meta:{
                        title:'用户列表',
                        auth:true,
                        activeMenu:'CategoryAdd'
                    }
                },
            ]
        },
    ]
}
